const model = require('../models');
const {users:user} = model;

const list = async (ctx, next) =>{
    const all = await user.findAll({});
    ctx.response.status = 200;
    ctx.response.body = all;
}

const create = async (ctx, next) =>{
    const create = await user.create({
        name: 'RZ',
        age: 16,
        gender: false,
    });
    ctx.response.status = 201;
    ctx.response.body = created;
    
}

module.exports = {
    'GET /create' : create,
    'GET /': list,
}